<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="{$_G['addon_url']}/Public/css/weui.css" />
		<link rel="stylesheet" type="text/css" href="{$_G['addon_url']}/Public/css/weui2.css" />
		<link rel="stylesheet" type="text/css" href="{$_G['addon_url']}/Public/css/weui3.css" />
		<link rel="stylesheet" type="text/css" href="{$_G['addon_url']}/Public/css/jquery-weui.min.css"/>
		<link rel="stylesheet" type="text/css" href="{$_G['addon_url']}/Public/css/icon.css" />
		<link rel="stylesheet" type="text/css" href="{$_G['addon_url']}/Public/css/yonghu.css"/>
		<link rel="stylesheet" type="text/css" href="{$_G['addon_url']}/Public/css/myfabu.css"/>
		<script src="{$_G['addon_url']}/Public/js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
		<title>我的发布</title>
		<style>
			@media screen and (max-width: 400px) {
				.roo img {
					width:87px;
					height:87px;
				}
			}
		</style>
	</head>
	<body>
		<div class="weui-header bg-orange">
			<div class="weui-header-left">
				<a class="icon icon-109" href="{:create_mobile_url('userCenter')}">返回</a>
			</div>
			<h1 class="weui-header-title">我的发布</h1>
		</div>
		<div class="weui_panel_bd">
			<div class="nimabi">
				<div class="haha">
					<img src="{$person.headimgurl}" />
				</div>
				
				<span class="name">{$person.nickname}</span>
			</div>
		</div>

		<div class="weui_cells moments">
			<script>
                $(function(){
                    $(".btnLike").on("click", function () {
						var href = $(this).attr("ajax-href");
						var parent = $(this).parents(".moments__post");
						$.post(href, function () {
							$.toast("删除成功");
							parent.remove();
                        });

                    })
                });
			</script>
			<!-- 普通的post -->
			<foreach name="goodsList" item="goods" >
			<div class="weui_cell moments__post weui-border-b">
				<div class="weui_cell_hd" >
					<span style="font-size: 1.5em;">{$goods.year}</span><span>{$goods.month}月</span>
				</div>
				<div class="weui_cell_bd" style="width:100%;">
					<div class="toolbar">
						<p class="timestamp"><span></span>&nbsp;<span></span></p>
						<div>
							<div id="actionMenu" class="actionMenu slideIn">
								<p class="actionBtn btnLike" ajax-href="{:create_mobile_url('ajaxRemoveGoods', array('id'=>$goods['id']))}"><i class="">删除</i></p>
								<a href="{:create_mobile_url('fabu', array('id'=>$goods['id']))}">
									<p class="actionBtn btnComment"><i class="">编辑</i></p>
								</a>
							</div>
						</div>
						<span id="actionToggle" class="actionToggle" style="float:right">更多操作..</span>
					</div>
					<!-- post内容 -->
					<p id="paragraph" class="paragraph">
						{$goods.describe}
					</p>
					<!-- 相册 -->
					<div class="thumbnails">
						<foreach name="goods.imgs" item="img" >
						<div class="roo">
							<img class="img-max" src="{$img}">
						</div>
						</foreach>

					</div>
					<a class="xiangq" href="{:create_mobile_url('detail',array('id'=>$goods['id']))}">
						<span class="f-blue">详情</span>
					</a>
				</div>
				<!-- 结束 post -->
			</div>
			</foreach>

		</div>
	</body>
	<script src="{$_G['addon_url']}/Public/js/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="{$_G['addon_url']}/Public/js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="{$_G['addon_url']}/Public/js/swiper.js" type="text/javascript" charset="utf-8"></script>
	<!--图片放大-->
	<script src="{$_G['addon_url']}/Public/js/showimg.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
			$('.moments__post').on('click','.actionToggle',function(){
				$(this).siblings('div').find('.actionMenu').toggleClass('active');
			});
			
		});
	</script>
</html>